/* 统一样式文件 - 转炉终点预测系统 */

:root {
    /* 颜色变量 - 统一配色方案 */
    --primary: #1976d2;
    --primary-light: #42a5f5;
    --primary-dark: #0d47a1;
    --primary-gradient: linear-gradient(135deg, #1976d2, #42a5f5);
    --secondary: #ff9800;
    --success: #4caf50;
    --warning: #ff9800;
    --danger: #f44336;
    --gray: #757575;
    --gray-light: #f5f5f5;
    --gray-dark: #424242;
    --text-color: #333333;
    --bg-color: #f8f9fa;
    
    /* 系统特有颜色 */
    --success-color: #4caf50;
    --warning-color: #ff9800;
    --danger-color: #f44336;
    --info-color: #2196f3;
    
    /* 阴影变量 */
    --shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    --shadow-sm: 0 2px 5px rgba(0, 0, 0, 0.05);
    --shadow-lg: 0 8px 20px rgba(0, 0, 0, 0.15);
    
    /* 边框圆角 */
    --radius: 8px;
    --radius-sm: 4px;
    --radius-lg: 12px;
    
    /* 布局变量 */
    --sidebar-width: 250px;
    --sidebar-collapsed-width: 60px;
    --header-height: 70px;
    --content-padding: 24px;
    --transition-speed: 0.3s;
}

/* 重置样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', 'Microsoft YaHei', 'PingFang SC', sans-serif;
    font-size: 14px;
    line-height: 1.5;
    color: var(--text-color);
    background-color: var(--bg-color);
    overflow: hidden;
    display: flex;
}

a {
    text-decoration: none;
    color: var(--primary);
    transition: color 0.3s ease;
}

a:hover {
    color: var(--primary-dark);
}

/* 侧边栏样式 - 统一使用深蓝色主题 */
.sidebar {
    width: var(--sidebar-width);
    background: linear-gradient(to bottom, #0a2e5c, #0d47a1); /* 更深的蓝色渐变 */
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow);
    z-index: 10;
    color: #ecf0f1;
    transition: width var(--transition-speed) ease;
    flex-shrink: 0;
    height: 100vh;
    overflow-y: auto;
}

.sidebar.collapsed {
    width: var(--sidebar-collapsed-width);
}

.sidebar-header {
    display: flex;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    height: var(--header-height);
}

.sidebar-logo {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    margin-right: 12px;
    font-size: 20px;
}

.sidebar-title {
    font-size: 16px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar-menu {
    flex: 1;
    padding: 16px 0;
    overflow-y: auto;
}

.sidebar-menu-title {
    font-size: 12px;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.5);
    padding: 16px 20px 8px;
    letter-spacing: 0.5px;
}

.sidebar-menu ul {
    list-style: none;
    padding: 0;
    margin: 0 0 16px;
}

.sidebar-menu ul li a {
    display: flex;
    align-items: center;
    padding: 10px 20px;
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: all 0.3s;
}

.sidebar-menu ul li a i {
    width: 24px;
    margin-right: 12px;
    font-size: 16px;
    text-align: center;
}

.sidebar-menu ul li a:hover {
    background-color: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.sidebar-menu ul li a.active {
    background-color: rgba(255, 255, 255, 0.15); /* 更微妙的高亮效果 */
    color: #fff;
    border-radius: var(--radius-sm);
    margin: 0 10px;
    padding: 10px;
    font-weight: 600; /* 加粗显示活动菜单 */
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1); /* 添加阴影效果 */
}

/* 为特定菜单添加特殊样式 */
.sidebar-menu ul li a[href="qd-display.html"].active,
.sidebar-menu ul li a[href="model-performance.html"].active,
.sidebar-menu ul li a[href="model-update.html"].active {
    background-color: rgba(66, 165, 245, 0.2); /* 特定菜单使用稍微不同的高亮色 */
    border-left: 3px solid #fff; /* 左侧添加白色边框 */
}

.sidebar-footer {
    padding: 15px 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.5);
}

.sidebar-footer i {
    margin-right: 8px;
}

/* 主容器样式 */
.container {
    flex: 1;
    height: 100vh;
    overflow-y: auto;
    padding: 0;
    background-color: #f5f7fa;
    transition: margin-left var(--transition-speed) ease;
}

/* 内容包装容器 */
.content-wrapper {
    padding: 20px;
}

/* 顶部导航栏 */
.header {
    height: var(--header-height);
    background-color: #fff;
    box-shadow: var(--shadow-sm);
    padding: 0 var(--content-padding);
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 5;
}

.header-left {
    display: flex;
    align-items: center;
}

.title {
    font-size: 20px;
    font-weight: 600;
    color: var(--primary-dark);
}

.subtitle {
    font-size: 13px;
    color: var(--gray);
    margin-top: 4px;
}

.header-right {
    display: flex;
    align-items: center;
}

/* 卡片样式 */
.card {
    background-color: #fff;
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    margin-bottom: 24px;
    overflow: hidden;
    transition: box-shadow 0.3s ease;
}

.card:hover {
    box-shadow: var(--shadow);
}

.card-header {
    padding: 16px 20px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.card-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--primary-dark);
    display: flex;
    align-items: center;
}

.card-title i {
    margin-right: 8px;
    color: var(--primary);
}

.card-content {
    padding: 20px;
}

/* 按钮样式 */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 16px;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
    outline: none;
    background-color: var(--gray-light);
    color: var(--text-color);
}

.btn i {
    margin-right: 8px;
    font-size: 14px;
}

.btn-primary {
    background-color: var(--primary);
    color: white;
}

.btn-primary:hover {
    background-color: var(--primary-dark);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.btn-secondary {
    background-color: rgba(25, 118, 210, 0.1);
    color: var(--primary);
}

.btn-secondary:hover {
    background-color: rgba(25, 118, 210, 0.15);
}

.btn-sm {
    padding: 6px 12px;
    font-size: 12px;
}

/* 表格样式 */
table {
    width: 100%;
    border-collapse: collapse;
    border-spacing: 0;
}

th, td {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

th {
    font-weight: 600;
    color: var(--gray-dark);
    background-color: rgba(0, 0, 0, 0.01);
}

tr:hover {
    background-color: rgba(0, 0, 0, 0.01);
}

/* 响应式调整 */
@media (max-width: 768px) {
    body {
        flex-direction: column;
    }
    
    .sidebar {
        width: 100%;
        height: auto;
        position: relative;
    }
    
    .sidebar.collapsed {
        height: var(--header-height);
        overflow: hidden;
    }
    
    .sidebar.expanded {
        height: auto;
        max-height: 80vh;
    }
    
    .container {
        margin-left: 0;
        width: 100%;
    }
    
    .header {
        flex-direction: column;
        height: auto;
        padding: 10px;
    }
    
    .header-left, .header-right {
        width: 100%;
        justify-content: space-between;
    }
    
    .header-right {
        margin-top: 10px;
    }
}

/* 辅助类 */
.mr-2 {
    margin-right: 8px;
}

.mb-3 {
    margin-bottom: 12px;
}

.text-success {
    color: var(--success-color);
}

.text-warning {
    color: var(--warning-color);
}

.text-danger {
    color: var(--danger-color);
}

.text-info {
    color: var(--info-color);
}

/* 提示框样式 */
.alert {
    padding: 16px;
    border-radius: var(--radius);
    margin-bottom: 16px;
    display: flex;
    align-items: flex-start;
}

.alert-icon {
    margin-right: 12px;
    font-size: 20px;
}

.alert-info {
    background-color: rgba(33, 150, 243, 0.1);
    border-left: 4px solid var(--info-color);
    color: var(--info-color);
}

.alert-success {
    background-color: rgba(76, 175, 80, 0.1);
    border-left: 4px solid var(--success-color);
    color: var(--success-color);
}

.alert-warning {
    background-color: rgba(255, 152, 0, 0.1);
    border-left: 4px solid var(--warning-color);
    color: var(--warning-color);
}

.alert-danger {
    background-color: rgba(244, 67, 54, 0.1);
    border-left: 4px solid var(--danger-color);
    color: var(--danger-color);
}

/* 侧边栏切换按钮 */
.sidebar-toggle {
    display: none;
    position: fixed;
    top: 20px;
    left: 20px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: var(--primary);
    color: white;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: var(--shadow);
    z-index: 100;
    transition: all 0.3s;
}

.sidebar-toggle:hover {
    background-color: var(--primary-dark);
}

.sidebar.collapsed .sidebar-toggle i {
    transform: rotate(180deg);
}

/* 移动端菜单按钮 */
.mobile-toggle {
    display: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: var(--primary);
    color: white;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    position: absolute;
    top: 15px;
    right: 15px;
    z-index: 100;
    box-shadow: var(--shadow);
    transition: all 0.3s;
}

.mobile-toggle:hover {
    background-color: var(--primary-dark);
}

/* 侧边栏遮罩层 */
.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 9;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
}

.sidebar-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* 下拉菜单 */
.dropdown {
    position: relative;
}

.dropdown-trigger {
    cursor: pointer;
    display: flex;
    align-items: center;
}

.dropdown-trigger i.fa-chevron-down {
    margin-left: 8px;
    font-size: 12px;
    transition: transform 0.3s;
}

/* 下拉菜单内容 */
.dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    min-width: 180px;
    background-color: white;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    z-index: 10;
    padding: 8px 0;
    margin-top: 8px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s;
}

.dropdown.active .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-item {
    display: flex;
    align-items: center;
    padding: 8px 16px;
    color: var(--text-color);
    text-decoration: none;
    transition: background-color 0.2s;
}

.dropdown-item:hover {
    background-color: rgba(0, 0, 0, 0.02);
}

.dropdown-item i {
    margin-right: 12px;
    font-size: 16px;
    width: 20px;
    text-align: center;
    color: var(--gray);
}

/* 移动端响应式调整 */
@media (max-width: 768px) {
    .mobile-toggle {
        display: flex;
    }
    
    .sidebar {
        position: fixed;
        left: -100%;
        width: 80%;
    }
    
    .sidebar.expanded {
        left: 0;
    }
    
    .container {
        width: 100%;
    }
    
    .sidebar-toggle {
        display: flex;
    }
    
    .header {
        padding-left: 60px;
    }
}

/* 用户相关样式 */
.header-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: rgba(0, 0, 0, 0.02);
    color: var(--gray);
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
    margin-left: 8px;
}

.header-icon:hover {
    background-color: rgba(0, 0, 0, 0.05);
    color: var(--primary);
}

.notification-badge {
    position: absolute;
    top: -2px;
    right: -2px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background-color: var(--danger-color);
    color: white;
    font-size: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
}

.user-dropdown {
    display: flex;
    align-items: center;
    padding: 0 12px;
    height: 40px;
    border-radius: 20px;
    background-color: rgba(0, 0, 0, 0.02);
    cursor: pointer;
    transition: all 0.2s;
    margin-left: 8px;
}

.user-dropdown:hover {
    background-color: rgba(0, 0, 0, 0.05);
}

.user-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    margin-right: 8px;
    object-fit: cover;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.user-name {
    font-size: 14px;
    color: var(--text-color);
    margin-right: 8px;
}

/* 可折叠面板 */
.collapsible {
    border: 1px solid rgba(0, 0, 0, 0.05);
    border-radius: var(--radius);
    overflow: hidden;
    margin-bottom: 16px;
}

.collapsible-header {
    padding: 12px 16px;
    background-color: rgba(0, 0, 0, 0.02);
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    transition: background-color 0.2s;
}

.collapsible-title {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-color);
    display: flex;
    align-items: center;
}

.collapsible-title i {
    margin-right: 8px;
    color: var(--primary);
}

.collapsible-content {
    padding: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease;
}

.collapsible.active .collapsible-content {
    padding: 16px;
    max-height: 1000px;
}

.collapsible-trigger i {
    transition: transform 0.3s;
}

.collapsible.active .collapsible-trigger i {
    transform: rotate(180deg);
}

/* 统一的表格容器 */
.table-responsive {
    overflow-x: auto;
    width: 100%;
}

/* 通用分页样式 */
.pagination {
    display: flex;
    justify-content: center;
    gap: 5px;
    margin-top: 20px;
}

.pagination-item {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-sm);
    background-color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: var(--text-color);
    border: 1px solid rgba(0, 0, 0, 0.1);
    transition: all 0.2s;
}

.pagination-item:hover {
    background-color: rgba(0, 0, 0, 0.05);
}

.pagination-item.active {
    background-color: var(--primary);
    color: white;
    border-color: var(--primary);
}

.pagination-item.disabled {
    opacity: 0.5;
    pointer-events: none;
}

/* 通用节标题样式 */
.section-title {
    font-size: 18px;
    font-weight: 600;
    margin: 20px 0 15px;
    color: var(--primary-dark);
    border-left: 4px solid var(--primary);
    padding-left: 10px;
}

/* 状态标签 */
.status-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}

.status-badge.active {
    background-color: rgba(76, 175, 80, 0.1);
    color: var(--success-color);
}

.status-badge.warning {
    background-color: rgba(255, 152, 0, 0.1);
    color: var(--warning-color);
}

.status-badge.error {
    background-color: rgba(244, 67, 54, 0.1);
    color: var(--danger-color);
}

.status-badge.info {
    background-color: rgba(33, 150, 243, 0.1);
    color: var(--info-color);
} 